fix(setup): make Temporal namespace creation idempotent via describe#3679
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughThe Temporal namespace setup now checks whether the target namespace exists before creating it. Existing namespaces return through an idempotent fast path, while other outcomes continue through the existing creation and error-handling logic. ChangesTemporal namespace setup
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/ok to test dcfef03 |
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
Most of NVIDIA#2768 (error suppression, missing diagnostics) was already addressed on main by NVIDIA#2546 and NVIDIA#2675: namespace create output is captured, "already exists" is tolerated, genuine errors are propagated, and _verify_temporal_namespaces double-checks the result. This closes the remaining gap from the issue's expected behaviour: check namespace existence with 'temporal operator namespace describe' and skip creation when it already exists, instead of relying on the create call failing with "already exists". Any describe failure (not-found or transient) simply falls through to create, which already propagates real errors (TLS, auth, connectivity) with diagnostics. Fixes NVIDIA#2768 Signed-off-by: Shayan Namaghi <snamaghi@nvidia.com>
dcfef03 to
ea6ef0d
Compare
|
🌿 Preview your docs: https://nvidia-preview-pull-request-3679.docs.buildwithfern.com/infra-controller |
Temporal namespace creation in
helm-prereqs/setup.shused to suppress all errors (2>/dev/null || true), which #2768 flagged as masking TLS/auth/connectivity faults. Most of that was since fixed on main (#2546, #2675): create output is captured, "already exists" is tolerated, genuine errors propagate, and_verify_temporal_namespacesdouble-checks the result.This PR closes the remaining gap from the issue's expected behaviour:
_create_temporal_namespacenow checks existence withtemporal operator namespace describeand skips creation when the namespace already exists, instead of relying on the create call failing with "already exists". Any describe failure (not-found or transient) simply falls through to create, which already propagates real errors with diagnostics — so no new error-message parsing is introduced.Related issues
Fixes #2768
Type of Change
Breaking Changes
Testing
bash -nclean. Behavioural safety net is unchanged: even if the describe fast-path misjudges, the existing create path and_verify_temporal_namespacesstill catch and report real failures. (TODO before submitting: run setup.sh phase 7f against a cluster twice to confirm the skip path logs "already exists".)